package org.bonitasoft.example.runtime;

import org.ow2.bonita.facade.IdentityAPI;
import org.ow2.bonita.facade.ManagementAPI;
import org.ow2.bonita.facade.QueryDefinitionAPI;
import org.ow2.bonita.facade.QueryRuntimeAPI;
import org.ow2.bonita.facade.RuntimeAPI;
import org.ow2.bonita.util.AccessorUtil;
import org.ow2.bonita.util.BonitaConstants;

public class Main {
	static ITDeployModule module;
	/**
	 * @param args
	 */
	

	private static final String JAAS_FILE_PATH="src/main/resources/jaas-standard.cfg";
	
	static {
	    System.setProperty(BonitaConstants.JAAS_PROPERTY, JAAS_FILE_PATH);
	    System.setProperty(BonitaConstants.REST_SERVER_ADDRESS_PROPERTY, "http://localhost:8080/bonita-server-rest");
	    System.setProperty(BonitaConstants.API_TYPE_PROPERTY, "REST");
	    System.setProperty(BonitaConstants.HOME, "C:/Users/wizard/Desktop/BOS-5.5-Tomcat-6.0.32/bonita/");
	  }
	
	public static void main(String[] args) {
		//setto le api
		
		 final ManagementAPI managementAPI = AccessorUtil.getManagementAPI();
		 final RuntimeAPI runtimeAPI = AccessorUtil.getRuntimeAPI();
		 final QueryRuntimeAPI queryRuntimeAPI = AccessorUtil.getQueryRuntimeAPI();
		 final IdentityAPI identityAPI = AccessorUtil.getIdentityAPI();
		 final QueryDefinitionAPI queryDefinitionAPI=AccessorUtil.getQueryDefinitionAPI();
		//lancio un nuovo itdeploymodule
		 
		module = new ITDeployModule(managementAPI,runtimeAPI,queryRuntimeAPI,identityAPI,queryDefinitionAPI);
	}

}
